home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ Control Panel Hide 7.xpl < prev    next >
Text File  |  1999-09-13  |  3KB  |  116 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 3.1"
  2. "TYPE"="6"
  3. "COUNT"="5"
  4. "UIPATH"="Appearance\Control Panel\OEM Icons"
  5. "NAME"="Visible OEM Items #2"
  6. "VERSION"="1.13"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display "Colorific" applet"
  9. "TEXT 2"="Display "3Deep" applet"
  10. "TEXT 3"="Display "Toshiba HW Config" applet"
  11. "TEXT 4"="Display "Toshiba Power Saver" applet"
  12. "TEXT 5"="Display "Toshiba Services" applet"
  13. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  14. "DESCRIPTION 2"="Colorific and 3Deep are video card utilities that help you adjust brightness, gamma, etc.  They come with many video cards."
  15. "DESCRIPTION 3"="The Toshiba items come with any Toshiba computer."
  16. "AUTHOR"="Xteq Systems"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  19. "COMMENT 2"="Special thanks to CptSiskoX (CptSiskoX@flashmail.com) for his help."
  20. "COMMENT 3"="Thanks also to Kathy for her help with the Toshiba items. See also: MS KB Q207750."
  21.  
  22.  
  23. '******************************************************************
  24. '***                COPY !!!! ONLY EDIT LINES BELOW!!!!        ****
  25. '******************************************************************
  26. sVals=""
  27. sVals2=Array("ColorificPanel.cpl","3Deep.cpl","HWSetup.cpl","PWRSAVE.cpl","Toshcfg.cpl") 
  28. sVals3=Array("ColorificPanel.cpl","3Deep.cpl","HWSetup.cpl","PWRSAVE.cpl","Toshcfg.cpl") 
  29. '******************************************************************
  30. '*** Keep an eye on the order (must be the same as "TEXT x") ! ****
  31. '******************************************************************
  32. sPath="HKCU\Control Panel\Don't Load\"
  33. sFile="CONTROL.INI"
  34. sFileSec="Don't Load"
  35.  
  36.  
  37.  
  38. SUB Plugin_Initialize
  39.  if GetWinVer=4 then
  40.     sVals=sVals3
  41.  else
  42.     sVals=sVals2
  43.  end if
  44.  
  45.  for i=0 to UBound(sVals)
  46.      Call ReadIt(i+1,sVals(i)) 
  47.  next 
  48. END SUB
  49.  
  50. Sub ReadIt(ITM,VAL)
  51.   If GetWinVer=2 or GetWinVer=4 then
  52.  
  53.      s=RegReadValue(sPath & VAL)
  54.      if IsEmpty(s)=true then
  55.         Call SetUIElement(ITM,true)
  56.      else
  57.         Call SetUIElement(ITM,false)
  58.      end if
  59.  
  60.   else
  61.  
  62.     s=IniReadValue(sFile,sFileSec,VAL)
  63.     if len(s)>0 then
  64.        Call SetUIElement(ITM,false)
  65.     else
  66.        Call SetUIElement(ITM,true)
  67.     end if
  68.      
  69.   end if
  70.      
  71. End Sub
  72.  
  73. 'Called when the Plugin should validate the Data the user has entered
  74. SUB Plugin_CheckData(ElementIndex)
  75. END SUB
  76.  
  77. 'Called when the Plugin should apply the changes
  78. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  79.  for i=0 to UBound(sVals)
  80.      Call WriteIt(i+1,sVals(i)) 
  81.  next 
  82. END SUB
  83.  
  84. Sub WriteIt(ITM,VAL)
  85.  b=GetUIElement(ITM)
  86.  if b=true then
  87.     'Display it
  88.  
  89.     if GetWinVer=2 or GetWinVer=4 then  
  90.        s=RegReadValue(sPath & VAL)
  91.        if IsEmpty(s)=false then
  92.           Call RegDeleteValue(sPath & VAL)
  93.        end if
  94.     else
  95.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  96.     end if
  97.  
  98.  else
  99.    'Hide it
  100.    
  101.    if GetWinVer=2 or GetWinVer=4 then
  102.       Call RegWriteValue(sPath & VAL,"1",1) 
  103.    else
  104.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  105.    end if
  106.  
  107.  end if   
  108. End Sub
  109.  
  110.  
  111. 'Called when the Plugin is about to be removed from memory
  112. SUB Plugin_Terminate
  113. END SUB
  114.  
  115.  
  116.